Source File
axis.go
Belonging Package
github.com/K-Phoen/grabana/heatmap/axis
package axisimport ()// Option represents an option that can be used to configure a Y axis.type Option func(axis *YAxis)type SDKAxis struct {Decimals *int `json:"decimals"`Format string `json:"format"`LogBase int `json:"logBase"`Show bool `json:"show"`Max *string `json:"max"`Min *string `json:"min"`SplitFactor *float64 `json:"splitFactor"`}// YAxis represents the Y axis of a heatmap.type YAxis struct {Builder *SDKAxis}// New creates a new YAxis configuration.func ( ...Option) *YAxis {:= &YAxis{Builder: &SDKAxis{Format: "short",LogBase: 1,Show: true,},}for , := range {()}return}// Unit sets the unit of the data displayed on this axis.func ( string) Option {return func( *YAxis) {.Builder.Format =}}// Decimals set the number of decimals to be displayed on the axis.func ( int) Option {return func( *YAxis) {.Builder.Decimals = &}}// Min sets the minimum value expected on this axis.func ( float64) Option {return func( *YAxis) {:= fmt.Sprintf("%f", ).Builder.Min = &}}// Max sets the maximum value expected on this axis.func ( float64) Option {return func( *YAxis) {:= fmt.Sprintf("%f", ).Builder.Max = &}}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |